#ifndef CLASSIC_H
#define CLASSIC_H
#include<QString>
#include"maze.h"
#include <QWidget>
#include<QPainter>
#include<QImage>
#include <QKeyEvent>
#include<QPixmap>
#include <QThread>
#include <QTimer>
#include <QTime>

namespace Ui {
class Classic;
}

class Classic : public QWidget
{
    Q_OBJECT

public:
    explicit Classic(QWidget *parent = 0);
    ~Classic();
    //画图
    void paintEvent(QPaintEvent *);
    //奇数偶数判断
    bool isEven(int sum);
    Node getStartPoint();
    void setStartPoint(Node node);
    void keyPressEvent(QKeyEvent *e);
    bool getIsHide(){
        return this->isHide;
    }
    QTimer* getTimer(){
        return this->timer;
    }
signals:
    void ret();
private slots:
    void on_Return_clicked();

    void on_Button_1_clicked();

    void on_Button_2_clicked();

    void on_Button_3_clicked();

    void on_Button_4_clicked();

    void on_Button_5_clicked();

    void on_Button_6_clicked();

    void on_Button_7_clicked();

    void on_Button_8_clicked();

    void on_Button_9_clicked();

    void on_Button_0_clicked();

    void on_Cancle_clicked();

    void on_Confirm_clicked();

    void on_Auto_clicked();

    void on_pushButton_clicked();

    void showTime();



private:
    QString t;
    Ui::Classic *ui;
    int n;
    Maze maze;
    int wid;
    bool isPathfinding,isPosition;
    Node startPoint;
    bool star;
    bool success;
    QTimer *timer;
    QTime   time;
    bool isHide;
};

#endif // CLASSIC_H
